package net.ktims.khub.runtime;


import net.ktims.khub.Invoke_API;
import net.ktims.khub.Invoke_APIResponse;
import net.ktims.khub.WsParam;
import net.ktims.khub.WsParamSet;
import oracle.j2ee.ws.client.BasicService;
import oracle.j2ee.ws.common.encoding.*;
import oracle.j2ee.ws.common.encoding.simpletype.*;
import oracle.j2ee.ws.common.encoding.soap.*;
import oracle.j2ee.ws.common.encoding.literal.*;
import oracle.j2ee.ws.common.soap.SOAPVersion;
import oracle.j2ee.ws.common.soap.SOAPEncodingConstants;
import oracle.j2ee.ws.common.wsdl.document.schema.SchemaConstants;
import javax.xml.rpc.*;
import javax.xml.rpc.encoding.*;
import javax.xml.namespace.QName;

public class WebService_SerializerRegistry extends SerializerRegistryBase implements SerializerConstants {
    public WebService_SerializerRegistry() {
    }
    
    public TypeMappingRegistry getRegistry() {
        
        TypeMappingRegistry registry = BasicService.getStandardTypeMappingRegistry();
        TypeMapping mapping12 = registry.getTypeMapping(SOAPEncodingConstants.getSOAPEncodingConstants(SOAPVersion.SOAP_12).getURIEncoding());
        TypeMapping mapping11 = registry.getTypeMapping(SOAPEncodingConstants.getSOAPEncodingConstants(SOAPVersion.SOAP_11).getURIEncoding());
        TypeMapping mapping = registry.getTypeMapping("");
        {
            QName type = new QName("http://ws.oi.khub.ktf.com/", "WsParam");
            CombinedSerializer serializer = new WsParam_LiteralSerializer(type, DONT_ENCODE_TYPE);
            registerSerializer(mapping,WsParam.class, type, serializer);
        }
        {
            QName type = new QName("http://ws.oi.khub.ktf.com/", "WsParamSet");
            CombinedSerializer serializer = new WsParamSet_LiteralSerializer(type, DONT_ENCODE_TYPE);
            registerSerializer(mapping,WsParamSet.class, type, serializer);
        }
        {
            QName type = new QName("http://ws.oi.khub.ktf.com/", "Invoke_API");
            CombinedSerializer serializer = new Invoke_API_LiteralSerializer(type, DONT_ENCODE_TYPE);
            registerSerializer(mapping,Invoke_API.class, type, serializer);
        }
        {
            QName type = new QName("http://ws.oi.khub.ktf.com/", "Invoke_APIResponse");
            CombinedSerializer serializer = new Invoke_APIResponse_LiteralSerializer(type, DONT_ENCODE_TYPE);
            registerSerializer(mapping,Invoke_APIResponse.class, type, serializer);
        }
        return registry;
    }
    
    private static void registerSerializer(TypeMapping mapping, Class javaType, QName xmlType,
        Serializer ser) {
        mapping.register(javaType, xmlType, new SingletonSerializerFactory(ser),
            new SingletonDeserializerFactory((Deserializer)ser));
    }
    
}
